Class symantec.itools.awt.shape.Shape
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.shape.Shape

Object
   |
   +----Component
           |
           +----symantec.itools.awt.shape.Shape

public abstract class Shape
extends Component
implements BevelStyle
Abstract class for shape components. This is the parent Shape class for the various shape components.

Version:
1.1, June 2, 1997
Author:
Symantec
See Also:
Ellipse, Circle, Rectangle, Square, VericalLine, HorizontalLine

Variable Index

 o bevelDarkerColor
The color to use as a hilight when BevelStyle is BEVEL_RAISED or BEVEL_LOWERED.
 o bevelLighterColor
The color to use as a hilight when BevelStyle is BEVEL_RAISED or BEVEL_LOWERED.
 o cachedBackground
Cached value of the background color.
 o changes
Handles tracking non-vetoable change listeners and notifying them of each change to this component's properties.
 o fill
Shape is filled if true.
 o fillColor
Color to fill shape with if fill is true.
 o height
Height of this shape.
 o style
Border style of this shape.
 o vetos
Handles tracking vetoable change listeners and notifying them of each change to this component's properties.
 o width
Width of this shape.

Constructor Index

 o symantec.itools.awt.shape.Shape()
Construct default Shape with BEVEL_LINE style.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all property change events.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener for all vetoable property change events.
 o getBevelStyle()
Returns the current style of the shape.
 o getFillColor()
Returns the current fill color of the shape.
 o getFillMode()
 o getMinimumSize()
Returns the minimum dimensions to properly display this component.
 o getPreferredSize()
Returns the recommended dimensions to properly display this component.
 o isFillMode()
Returns the current fill mode of the shape.
 o paint(Graphics)
Paints this component using the given graphics context.
 o preferredSize()
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all property change events.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a listener for all vetoable property change events.
 o reshape(int, int, int, int)
Moves and/or resizes this component.
 o setBevelStyle(int)
Sets the border style of the shape.
 o setFillColor(Color)
Sets the fill color of the shape.
 o setFillMode(boolean)
Sets the fill mode of the shape.
 o updateBevelColors(Color)
Used to calculate the colors for the different bevel styles.

Variables

 o bevelDarkerColor
protected java.awt.Color bevelDarkerColor
The color to use as a hilight when BevelStyle is BEVEL_RAISED or BEVEL_LOWERED.

 o bevelLighterColor
protected java.awt.Color bevelLighterColor
The color to use as a hilight when BevelStyle is BEVEL_RAISED or BEVEL_LOWERED.

 o cachedBackground
protected java.awt.Color cachedBackground
Cached value of the background color. Used to determine if calculated colors need to be updated.

 o changes
protected symantec.itools.beans.PropertyChangeSupport changes
Handles tracking non-vetoable change listeners and notifying them of each change to this component's properties.

 o fill
protected boolean fill
Shape is filled if true.

 o fillColor
protected java.awt.Color fillColor
Color to fill shape with if fill is true.

 o height
protected int height
Height of this shape.

 o style
protected int style
Border style of this shape.

 o vetos
protected symantec.itools.beans.VetoableChangeSupport vetos
Handles tracking vetoable change listeners and notifying them of each change to this component's properties.

 o width
protected int width
Width of this shape.

Constructors

 o Shape
protected Shape()
Construct default Shape with BEVEL_LINE style.

Methods

 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all property change events.

Parameters:
listener - the listener to add
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener for all vetoable property change events.

Parameters:
listener - the listener to add
See Also:
removeVetoableChangeListener
 o getBevelStyle
public int getBevelStyle()
Returns the current style of the shape.

See Also:
setBevelStyle
 o getFillColor
public java.awt.Color getFillColor()
Returns the current fill color of the shape.

See Also:
setFillColor
 o getFillMode
public boolean getFillMode()
Note: getFillMode() is deprecated.

See Also:
isFillMode
 o getMinimumSize
public java.awt.Dimension getMinimumSize()
Returns the minimum dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the minimum size of this component.

Overrides:
getMinimumSize in class Component
See Also:
getPreferredSize
 o getPreferredSize
public java.awt.Dimension getPreferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component.

Overrides:
getPreferredSize in class Component
See Also:
minimumSize
 o isFillMode
public boolean isFillMode()
Returns the current fill mode of the shape.

See Also:
setFillMode
 o paint
public synchronized void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its [0,0] coordinate is this component's top-left corner.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Component
See Also:
repaint, update
 o preferredSize
public java.awt.Dimension preferredSize()
Note: preferredSize() is deprecated.

Overrides:
preferredSize in class Component
See Also:
getPreferredSize
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all property change events.

Parameters:
listener - the listener to remove
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a listener for all vetoable property change events.

Parameters:
listener - the listener to remove
See Also:
addVetoableChangeListener
 o reshape
public void reshape(int x,
                    int y,
                    int width,
                    int height)
Moves and/or resizes this component. This is a standard Java AWT method which gets called to move and/or resize this component. Components that are in containers with layout managers should not call this method, but rely on the layout manager instead.

Parameters:
x - horizontal position in the parent's coordinate space
y - vertical position in the parent's coordinate space
width - the new width
height - the new height
Overrides:
reshape in class Component
 o setBevelStyle
public void setBevelStyle(int s) throws PropertyVetoException
Sets the border style of the shape.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getBevelStyle
 o setFillColor
public void setFillColor(Color color) throws PropertyVetoException
Sets the fill color of the shape.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getFillColor
 o setFillMode
public void setFillMode(boolean f) throws PropertyVetoException
Sets the fill mode of the shape.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isFillMode
 o updateBevelColors
protected void updateBevelColors(Color c)
Used to calculate the colors for the different bevel styles.

Parameters:
c - The color of the background to make bevel colors from.
See Also:
addNotify, setBackground

All Packages  Class Hierarchy  This Package  Previous  Next  Index